/*
 * Project: jcerticles
 * Copyright(c) 2011 jcerticles
 * All rights reserved.
 *
 * $Revision $, last modified $Date $ by $Author $
 */
package com.quintilis31.home.core.content.facade.impl;

import java.util.List;

import javax.annotation.Resource;

import com.quintilis31.home.common.repository.content.Question;
import com.quintilis31.home.common.repository.content.ContentSearchResultsVO;
import com.quintilis31.home.core.content.facade.IContentFacade;
import com.quintilis31.home.core.content.service.IContentService;
import com.quintilis31.home.core.content.util.ExamObject;

/**
 * TODO... Write javadoc...
 * @author jothi
 * @since  1.6
 */
public final class ContentFacadeImpl implements IContentFacade {
	
	/**
	 * Set the ContentServiceImpl instance
	 * @param contentService
	 */
    public void setContentService(IContentService contentService) {
        this.contentService = contentService;
    }

    @Resource(name = "contentService")
    private IContentService contentService;	

    /**
     *
     * @param i j
     */
     public void test(int i) {}

	@Override
	public List < ContentSearchResultsVO > getFileSearchResultList(String searchQuery, final int skipRecords, final int takeRecords) {
		return contentService.getFileSearchResultList(searchQuery, skipRecords, takeRecords);
	}

	@Override
	public Question getRandomQuestion(long technologyId) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List < Question > getAllQuestionsForExam(final long technologyId, final	long subTechnologyId) {
		return contentService.getAllQuestionsForExam(technologyId, subTechnologyId);
	}

	@Override
	public ExamObject createExamObject(final long technologyId, final long subTechnologyId) {
		return contentService.createExamObject(technologyId, subTechnologyId);
	}

	@Override
	public ExamObject updateExamObjectwithNextQuestion(final ExamObject exam, final List < Long > answers, long mappedQuestionId) {
		return contentService.updateExamObjectwithNextQuestion(exam, answers, mappedQuestionId);
	}

	@Override
	public ExamObject updateExamObjectForQuestionId(final ExamObject exam, final long mappedQuestionId) {
		// TODO Auto-generated method stub
		return null;
	}
}